import multiprocessing as mp
from time import sleep


def func():
    sleep(30*60)
    print('子进程')


if __name__ == '__main__':
    # 实例化进程对象
    p = mp.Process(target=func)

    # 开启进程
    p.start()

    # 回收进程
    p.join()

    print(p.name)
    print(p.pid)
    print(p.is_alive())
    print(p.daemon)


